package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MemberDetailDao;
import com.itheima.entity.Result;
import com.itheima.pojo.Member;
import com.itheima.service.MemberDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@Service(interfaceClass = MemberDetailService.class)
@Transactional
public class MemberDetailServiceImpl implements MemberDetailService {

    @Autowired
    private MemberDetailDao memberDetailDao;

    @Override
    public Result updateMember(Member member) {
        try {
            memberDetailDao.updateMember(member);
            return new Result(true,"修改成功");
        } catch (Exception e) {
            e.printStackTrace();
            return new Result(false,"修改失败");
        }
    }
}
